define([],function(){
        var tpl = {};

	tpl.foodLibirayList = function(){
		var html = "";
		html += List();
		return html;
	}
	tpl.addFoodLibirayForm = function(){
		var html = "";
		html += addForm();
		return html;
	}

	var List = function(){
		return 	'<script id="foodLibiray_List" type="text-html">'+
			'   <div class="food-box add-food" id="addFoodLibiray">'+
                        '       <i class="fa fa-plus" aria-hidden="true"></i>'+
                        '   </div>'+
                        '   {{each list as value i}}'+
                        '   <div class="food-box" foodLibraryId="{{value.foodLibraryId}}">'+
                        '       <div class="food-info">'+
                        '           <div class="food-name">'+
                        '               <i class="fa fa-folder-o" aria-hidden="true"></i>'+
                        '               {{value.foodLibraryName}}'+
                        '           </div>'+
                        '           <div class="food-type">'+
                        '               <span>{{value.createName}}</span>'+
                        '               <i class="fa fa-circle" aria-hidden="true"></i>'+
                        '               <span>{{value.createTime}}</span>'+
                        '           </div>'+
                        '       </div>'+
                        '       <div class="food-operation">'+
                        '           <span class="setFoodLibrary">'+
                        '               <i class="fa fa-cog" aria-hidden="true"></i><br>'+
                        '               设置'+
                        '           </span>'+
                        '       </div>'+
                        '   </div>'+
                        '   {{/each}}'+
			'</script>';
	}

	var addForm = function(){
		return 	'<script id="foodLibiray_addForm" type="text-html">'+
        		'   <form class="form-horizontal">'+
                        '       <div class="form-group">'+
                        '           <label class="col-sm-3 control-label"><i class="not-null">*</i>食品库名称</label>'+
                        '           <div class="col-sm-8">'+
                        '               <input type="text" name="foodLibraryName" class="form-control" value="{{foodLibraryName}}" placeholder="请输入食品库名称">'+
                        '           </div>'+
                        '       </div>'+
                        '       <div class="form-group">'+
                        '           <label class="col-sm-3 control-label">备注</label>'+
                        '           <div class="col-sm-8">'+
                        '               <input type="text" name="remark" class="form-control" value="{{remark}}" placeholder="请输入备注">'+
                        '           </div>'+
                        '       </div>'+
                        '       <div class="form-group">'+
                        '           <div class="col-sm-offset-3 col-sm-8">'+
                        '               <div id="saveFoodLibirayBtn" class="btn btn-info" foodLibraryId="{{foodLibraryId}}">确定</div>'+
                        '           </div>'+
                        '       </div>'+
                        '   </form>'+
        		'</script>';
	}

	return tpl;
});